package framework.core
{
import flash.text.Font;

/**
 * FontLib
 * 
 * @author jliang
 */
public class FontLib
{
    //==========================================================================
    //  Class Properties
    //==========================================================================	
	private static var uiFont:Font;
	
    public static function get UI_FONT_NAME():String
	{
		return "UIFont";
	}
	
	private static var descFont:Font;
	
	public static function get DESC_FONT_NAME():String
	{
		return "DescFont";
	}
    //==========================================================================
    //  Class methods
    //==========================================================================	
	public static function registerFonts(fontRef:Class):void
	{				
		var list:Array = Font.enumerateFonts(true);
		
		var uiFontClass:Class = fontRef.UIFontClass as Class;
		uiFont = new uiFontClass() as Font;
		Font.registerFont(uiFontClass);
		
		var descFontClass:Class = fontRef.DescFontClass as Class;
		descFont = new descFontClass() as Font;
		Font.registerFont(descFontClass);
	}
	
	public static function addFont(fontClass:Class):void
	{
		Font.registerFont(fontClass);
	}
}
}